import 'package:byw_blog/listener/OnCLickListener.dart';
import 'package:flutter/material.dart';

class TagWeight extends StatelessWidget {
  String tag = "",type = "";
  OnCLickListener? listener;

  TagWeight(this.tag, {super.key,required this.type,this.listener});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.all(5),
      child: InkWell(
        onTap: ()=>{
          listener?.onTap(type,tag)
        },
        child: Chip(
          backgroundColor: const Color(0xE3F1F1F1),
          label: Text(
            tag,
            style: const TextStyle(fontSize: 12, color: Colors.grey),
          ),
          materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
        ),
      ),
    );
  }
}
